<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::group(['namespace'=>'Home'], function ()
{
    Route::get('/','IndexController@index');
    Route::get('/cate/{id}','IndexController@cate');
    Route::get('/art/{id}','IndexController@article');
});

Route::any('Admin/login','Admin\LoginController@login');;
Route::get('Admin/code/{id}','Admin\LoginController@code');

Route::group(['middleware' =>['admin.login'],'prefix'=>'Admin','namespace'=>'Admin'],function()
{
    Route::get('index','IndexController@index');
    Route::get('info','IndexController@info');
    Route::get('guit','LoginController@guit');
    Route::any('pass','IndexController@pass');
    Route::post('cate/changeorder','CategoryController@changeorder');
    Route::post('link/changeorder','LinkController@changeorder');
    Route::post('navs/changeorder','NavsController@changeorder');
    Route::post('conf/changeorder','ConfController@changeorder');
    Route::post('conf/changeContent','ConfController@changeContent');
    Route::get('conf/putFile','ConfController@putFile');
    Route::post('article/upload','ArticleController@upload');
    Route::post('article/upload_up/{id}','ArticleController@upload');
    Route::resource('category','CategoryController');
    Route::resource('article','ArticleController');
    Route::resource('link','LinkController');
    Route::resource('navs','NavsController');
    Route::resource('conf','ConfController');
});

